package chaw.android.util;

import android.content.Context;
import android.content.SharedPreferences;

public class Preferences {
	static public SharedPreferences pref;
	static public SharedPreferences.Editor prefEdtior;
	
	static public String getValue(Context context, String value){
		pref = context.getSharedPreferences("asdf", 0);
		return pref.getString(value, "");
	}
	
	static public boolean getBoolean(Context context, String value){
		pref = context.getSharedPreferences("asdf", 0);
		return pref.getBoolean(value, false);
	}
	
	static public void setValue(Context context, String key, String value){
		pref = context.getSharedPreferences("asdf", 0);
		prefEdtior = pref.edit();
		
		prefEdtior.putString(key, value);
		prefEdtior.commit();
	}
	
	static public void setBoolean(Context context, String key, boolean value){
		pref = context.getSharedPreferences("asdf", 0);
		prefEdtior = pref.edit();
		
		prefEdtior.putBoolean(key, value);
		prefEdtior.commit();
	}
}
